package com.ymm.spark.dao.impl;

import com.ymm.spark.config.JdbcHelper;
import com.ymm.spark.dao.ITop10SessionDAO;
import com.ymm.spark.domain.Top10Session;

/**
 * @author zhangj
 * @date 2019/11/9
 */
public class ITop10SessionDAOImpl implements ITop10SessionDAO {


	/**
	 * 插入top10活跃session表
	 *
	 * @param top10Session
	 */
	@Override
	public void insert(Top10Session top10Session) {
		String sql = "insert into top10_session values(?,?,?,?)";

		Object[] params = new Object[]{top10Session.getTaskid(),
				top10Session.getCategoryid(),
				top10Session.getSessionid(),
				top10Session.getClickCount()};

		JdbcHelper jdbcHelper = JdbcHelper.getInstance();
		jdbcHelper.executeUpdate(sql, params);
	}
}
